<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 7.3.0">

  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.ico">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.ico">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha256-wiz7ZSCn/btzhjKDQBms9Hx4sSeUYsDrTLg7roPstac=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancyapps-ui/5.0.28/fancybox/fancybox.css" integrity="sha256-6cQIC71/iBIYXFK+0RHAvwmjwWzkWd+r7v/BX3/vZDc=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pace/1.2.4/themes/green/pace-theme-minimal.css">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pace/1.2.4/pace.min.js" integrity="sha256-gqd7YTjg/BtfqWSwsJOvndl0Bxc8gFImLEkXQT8+qj0=" crossorigin="anonymous"></script>

<script class="next-config" data-name="main" type="application/json">{"hostname":"sumumm.github.io","root":"/","images":"/images","scheme":"Gemini","darkmode":false,"version":"8.19.2","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":true,"style":"mac"},"fold":{"enable":true,"height":300},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":true,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":true,"transition":{"menu_item":"fadeInDown","post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false}}</script><script src="/js/config.js"></script>

    <meta name="description" content="本文主要是体验正点原子I.MX6U-ALPHA开发板出厂系统——从TFTP加载linux镜像和设备树，从NFS加载根文件系统的相关笔记，若笔记中有错误或者不合适的地方，欢迎批评指正😃。">
<meta property="og:type" content="article">
<meta property="og:title" content="LV01-02-IMX6ULL-ALPHA开发板体验-05-从tftp和nfs启动系统">
<meta property="og:url" content="https://sumumm.github.io/post/172a0248.html">
<meta property="og:site_name" content="苏木">
<meta property="og:description" content="本文主要是体验正点原子I.MX6U-ALPHA开发板出厂系统——从TFTP加载linux镜像和设备树，从NFS加载根文件系统的相关笔记，若笔记中有错误或者不合适的地方，欢迎批评指正😃。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830071116981.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830071234560.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830071804472.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830074206692.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830074346769.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830074505866.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731182205914.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830075012052.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830075400490.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731182402754.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831063129685.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831063627248.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831065316358.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831065241349.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831065557292.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831065639933.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831092758373.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731184858116.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831070713973.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831070810863.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831071152604.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831071321539.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731185428305.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831093853900.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831095915924.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831072012231.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/a698df05cdd9e623d22c8213a1c13f1c.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/1e1b512e5cab46991cdb1db8120416f5.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/34f42d8017aaf6e91ee148b34a7b5eb1.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/0a316cd4e33c9b5f7da5c7564c7009b9.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/530ed47555b7f0571c0279e06b9695d7.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831085847054.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831092037495.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831092136017.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831091929874.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831090140714.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831090512467.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831092241852.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831092332328.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731192258556.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731193136229.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731192629843.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731192747078.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731193359465.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731193446085.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731195134292.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731195712698.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731200100507.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20221023160744688.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731200750378.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731201012558.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731201429073.png">
<meta property="article:published_time" content="2023-09-08T11:25:31.000Z">
<meta property="article:modified_time" content="2025-06-13T16:25:57.031Z">
<meta property="article:author" content="苏木">
<meta property="article:tag" content="(ALPHA)LV01-IMX6ULL平台">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830071116981.png">


<link rel="canonical" href="https://sumumm.github.io/post/172a0248.html">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"https://sumumm.github.io/post/172a0248.html","path":"post/172a0248.html","title":"LV01-02-IMX6ULL-ALPHA开发板体验-05-从tftp和nfs启动系统"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>LV01-02-IMX6ULL-ALPHA开发板体验-05-从tftp和nfs启动系统 | 苏木</title>
  








    <script src="/js/browser_tools_disable.js"></script>

  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
<!-- hexo injector head_end start --><link rel="stylesheet" href="https://unpkg.com/hexo-next-tags-plus@latest/lib/tag_plus.css" media="defer" onload="this.media='all'"><!-- hexo injector head_end end --></head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <div class="column">
      <header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">苏木</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">我的学习之路</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger" aria-label="搜索" role="button">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>苏木的家</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类页<span class="badge">42</span></a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档页<span class="badge">673</span></a></li><li class="menu-item menu-item-flink"><a href="/flink/" rel="section"><i class="fa fa-link fa-fw"></i>友人帐</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于我</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</header>
        
  
  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%80%E3%80%81%E5%86%99%E5%9C%A8%E6%9C%80%E5%89%8D%E9%9D%A2%E7%9A%84"><span class="nav-text">一、写在最前面的</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%BA%8C%E3%80%81%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83"><span class="nav-text">二、网络环境</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-Ubuntu"><span class="nav-text">1. Ubuntu</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-windows"><span class="nav-text">2. windows</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-Linux%E5%BC%80%E5%8F%91%E6%9D%BF"><span class="nav-text">3. Linux开发板</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E6%96%87%E4%BB%B6%E5%87%86%E5%A4%87"><span class="nav-text">三、文件准备</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-%E9%9C%80%E8%A6%81%E5%93%AA%E4%BA%9B%E6%96%87%E4%BB%B6%EF%BC%9F"><span class="nav-text">1. 需要哪些文件？</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E8%8E%B7%E5%8F%96%E6%96%87%E4%BB%B6"><span class="nav-text">2. 获取文件</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%9B%9B%E3%80%81uboot%E4%B8%8B%E7%9A%84%E6%93%8D%E4%BD%9C"><span class="nav-text">四、uboot下的操作</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-%E8%BF%9B%E5%85%A5uboot"><span class="nav-text">1. 进入uboot</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E8%AE%BE%E7%BD%AE"><span class="nav-text">2. 网络环境变量设置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-%E4%BF%AE%E6%94%B9-bootcmd-%E5%92%8C-bootargs"><span class="nav-text">3. 修改 bootcmd 和 bootargs</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#3-1-bootcmd"><span class="nav-text">3.1 bootcmd</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-2-bootargs"><span class="nav-text">3.2 bootargs</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#4-%E9%87%8D%E5%90%AFuboot%E6%B5%8B%E8%AF%95"><span class="nav-text">4. 重启uboot测试</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#4-1-uboot%E5%90%AF%E5%8A%A8"><span class="nav-text">4.1 uboot启动</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-2-%E4%B8%8B%E8%BD%BD%E8%AE%BE%E5%A4%87%E6%A0%91%E5%92%8Clinux%E9%95%9C%E5%83%8F"><span class="nav-text">4.2 下载设备树和linux镜像</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-3-%E5%90%AF%E5%8A%A8linux%E9%95%9C%E5%83%8F"><span class="nav-text">4.3 启动linux镜像</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#5-%E6%81%A2%E5%A4%8D%E5%8E%9F%E6%9C%89%E5%90%AF%E5%8A%A8%E6%96%B9%E5%BC%8F"><span class="nav-text">5. 恢复原有启动方式</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%BA%94%E3%80%81%E9%97%AE%E9%A2%98%E5%A4%84%E7%90%86"><span class="nav-text">五、问题处理</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-ubuntu20-04-NFS%E7%89%88%E6%9C%AC%E9%97%AE%E9%A2%98"><span class="nav-text">1. ubuntu20.04 NFS版本问题</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-1-%E7%A1%AE%E8%AE%A4%E5%BD%93%E5%89%8D%E6%94%AF%E6%8C%81%E7%9A%84nfs%E7%89%88%E6%9C%AC"><span class="nav-text">1.1 确认当前支持的nfs版本</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-2-%E5%88%87%E6%8D%A2Linux%E5%86%85%E6%A0%B8"><span class="nav-text">1.2 切换Linux内核</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-2-1-%E6%9F%A5%E7%9C%8B%E5%BD%93%E5%89%8D%E5%AD%98%E5%9C%A8%E7%9A%84%E5%86%85%E6%A0%B8%E7%89%88%E6%9C%AC"><span class="nav-text">1.2.1 查看当前存在的内核版本</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#1-2-2-%E5%AE%89%E8%A3%85%E6%8C%87%E5%AE%9A%E7%89%88%E6%9C%AC%E7%9A%84Linux%E5%86%85%E6%A0%B8"><span class="nav-text">1.2.2 安装指定版本的Linux内核</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#1-2-3-%E4%BF%AE%E6%94%B9%E5%90%AF%E5%8A%A8%E9%85%8D%E7%BD%AE%EF%BC%8C%E4%BD%BF%E7%94%A8%E6%96%B0%E7%9A%84Linux%E5%86%85%E6%A0%B8%E5%90%AF%E5%8A%A8"><span class="nav-text">1.2.3 修改启动配置，使用新的Linux内核启动</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#1-2-4-%E5%BC%80%E6%9C%BA%E9%80%89%E6%8B%A9%E5%90%88%E9%80%82%E7%9A%84Linux%E5%86%85%E6%A0%B8%E7%89%88%E6%9C%AC"><span class="nav-text">1.2.4 开机选择合适的Linux内核版本</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-3-NFS%E9%85%8D%E7%BD%AE"><span class="nav-text">1.3 NFS配置</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-3-1-%E4%BF%AE%E6%94%B9-etc-default-nfs-kernel-server%E6%96%87%E4%BB%B6"><span class="nav-text">1.3.1 修改&#x2F;etc&#x2F;default&#x2F;nfs-kernel-server文件</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#1-3-2-%E4%BF%AE%E6%94%B9-etc-hosts%E6%96%87%E4%BB%B6"><span class="nav-text">1.3.2 修改&#x2F;etc&#x2F;hosts文件</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#1-3-3-%E4%BF%AE%E6%94%B9-etc-nfs-conf%E6%96%87%E4%BB%B6"><span class="nav-text">1.3.3 修改&#x2F;etc&#x2F;nfs.conf文件</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-4-%E9%87%8D%E5%90%AFnfs%E6%9C%8D%E5%8A%A1"><span class="nav-text">1.4 重启nfs服务</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-5-%E6%9F%A5%E7%9C%8Bnfs%E7%89%88%E6%9C%AC%E5%8F%B7"><span class="nav-text">1.5 查看nfs版本号</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-ubuntu22-04-NFS%E7%89%88%E6%9C%AC%E9%97%AE%E9%A2%98"><span class="nav-text">2. ubuntu22.04 NFS版本问题</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E8%AE%BE%E5%A4%87%E6%A0%91%E5%90%8D%E7%A7%B0%E9%97%AE%E9%A2%98"><span class="nav-text">2. 设备树名称问题</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#2-1-%E9%97%AE%E9%A2%98%E5%A4%8D%E7%8E%B0"><span class="nav-text">2.1 问题复现</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-2-%E9%97%AE%E9%A2%98%E5%88%86%E6%9E%90"><span class="nav-text">2.2 问题分析</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-3-%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95"><span class="nav-text">2.3 解决方法</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#2-3-1-%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%951"><span class="nav-text">2.3.1 解决方法1</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-3-2-%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%952"><span class="nav-text">2.3.2 解决方法2</span></a></li></ol></li></ol></li></ol></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="苏木"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">苏木</p>
  <div class="site-description" itemprop="description">莫道桑榆晚，为霞尚满天</div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">673</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">42</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
        <span class="site-state-item-count">43</span>
        <span class="site-state-item-name">标签</span>
      </div>
  </nav>
</div>
  <div class="links-of-author animated">
      <span class="links-of-author-item">
        <a href="https://github.com/sumumm" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;sumumm" rel="noopener me" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
  </div>

        </div>
      </div>
    </div>

    
  </aside>


    </div>

    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://sumumm.github.io/post/172a0248.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="苏木">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="苏木">
      <meta itemprop="description" content="莫道桑榆晚，为霞尚满天">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="LV01-02-IMX6ULL-ALPHA开发板体验-05-从tftp和nfs启动系统 | 苏木">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          LV01-02-IMX6ULL-ALPHA开发板体验-05-从tftp和nfs启动系统
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2023-09-08 19:25:31" itemprop="dateCreated datePublished" datetime="2023-09-08T19:25:31+08:00">2023-09-08</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/" itemprop="url" rel="index"><span itemprop="name">嵌入式开发</span></a>
        </span>
          ，
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/" itemprop="url" rel="index"><span itemprop="name">02IMX6ULL平台</span></a>
        </span>
          ，
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/" itemprop="url" rel="index"><span itemprop="name">LV01-IMX6ULL平台</span></a>
        </span>
    </span>

  
    <span class="post-meta-break"></span>
    <span class="post-meta-item" title="本文字数">
      <span class="post-meta-item-icon">
        <i class="far fa-file-word"></i>
      </span>
      <span class="post-meta-item-text">本文字数：</span>
      <span>10k</span>
    </span>
    <span class="post-meta-item" title="阅读时长">
      <span class="post-meta-item-icon">
        <i class="far fa-clock"></i>
      </span>
      <span class="post-meta-item-text">阅读时长 &asymp;</span>
      <span>38 分钟</span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody"><p>本文主要是体验正点原子I.MX6U-ALPHA开发板出厂系统——从TFTP加载linux镜像和设备树，从NFS加载根文件系统的相关笔记，若笔记中有错误或者不合适的地方，欢迎批评指正😃。</p>
<span id="more"></span>

<!-- Photo: https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/ -->

<details class="folding-tag" blue><summary> 点击查看使用工具及版本 </summary>
              <div class='content'>
              <table>    <tr>        <td align="center" rowspan="5">PC端开发环境</td>        <td align="center" width=150px>Windows</td>        <td align="left">Windows11</td>    </tr>    <tr>        <td align="center">Ubuntu</td>        <td align="left">Ubuntu20.04.6的64位版本（一开始使用的是16.04版本，后来进行了升级）</td>      </tr>    <tr>        <td align="center">VMware® Workstation 17 Pro</td>        <td align="left">17.0.0 build-20800274</td>      </tr>    <tr>        <td align="center">终端软件</td>        <td align="left">MobaXterm(Professional Edition v23.0 Build 5042 (license))</td>    </tr>    <tr>        <td align="center">Win32DiskImager</td>        <td align="left">Win32DiskImager v1.0</td>      </tr>    <tr>        <td align="center" rowspan="3">Linux开发板环境</td>        <td align="center">Linux开发板</td>        <td align="left">正点原子 i.MX6ULL Linux 阿尔法开发板</td>      </tr>    <tr>        <td align="center">uboot</td>        <td align="left">NXP官方提供的uboot，NXP提供的版本为uboot-imx-rel_imx_4.1.15_2.1.0_ga(使用的uboot版本为U-Boot 2016.03)</td>      </tr>    <tr>        <td align="center">linux内核</td>        <td align="left">linux-4.15(NXP官方提供)</td>      </tr></table>
              </div>
            </details>

<details class="folding-tag" blue><summary> 点击查看本文参考资料 </summary>
              <div class='content'>
              <table>    <tr>        <td align="center">分类</td>        <td align="center">网址</td>        <td align="center">说明</td>    </tr>    <tr>        <td align="center" rowspan="5">官方网站</td>        <td align="left"><a href="https://www.arm.com/" target="_blank">https://www.arm.com/</a></td>        <td align="left">ARM官方网站，在这里我们可以找到Cotex-Mx以及ARMVx的一些文档</td>    </tr>    <tr>        <td align="left"><a href="https://www.nxp.com.cn/" target="_blank">https://www.nxp.com.cn/ </a></td>        <td align="left">NXP官方网站</td>    </tr>    <tr>        <td align="left"><a href="https://www.nxpic.org.cn/" target="_blank">https://www.nxpic.org.cn/</a></td><td align="left">NXP 官方社区</td>    </tr>    <tr>        <td align="left"><a href="https://u-boot.readthedocs.io/en/latest/" target="_blank">https://u-boot.readthedocs.io/en/latest/</a></td><td align="left">u-boot官网</td>    </tr>    <tr>        <td align="left"><a href="https://www.kernel.org/" target="_blank">https://www.kernel.org/</a></td><td align="left">linux内核官网</td>    </tr></table>
              </div>
            </details>

<details class="folding-tag" blue><summary> 点击查看相关文件下载 </summary>
              <div class='content'>
              <table>    <tr>        <td align="center">分类</td>        <td align="center">网址</td>        <td align="center">说明</td>    </tr>    <tr>        <td align="center" rowspan="4">NXP</td>        <td align="left"><a href="https://github.com/nxp-imx" target="_blank">https://github.com/nxp-imx</a></td>        <td align="left">NXP imx开发资源GitHub组织，里边会有u-boot和linux内核的仓库</td>    </tr>    <tr>        <td align="left"><a href="https://elixir.bootlin.com/linux/latest/source" target="_blank">https://elixir.bootlin.com/linux/latest/source</a></td>        <td align="left">在线阅读linux kernel源码</td>    </tr>    <tr>        <td align="left"><a href="https://github.com/nxp-imx/linux-imx/releases/tag/rel_imx_4.1.15_2.1.0_ga" target="_blank">nxp-imx/linux-imx/releases/tag/rel_imx_4.1.15_2.1.0_ga</a></td>        <td align="left">NXP linux内核仓库tags中的rel_imx_4.1.15_2.1.0_ga</td>    </tr>    <tr>        <td align="left"><a href="https://github.com/nxp-imx/uboot-imx/releases/tag/rel_imx_4.1.15_2.1.0_ga" target="_blank">nxp-imx/uboot-imx/releases/tag/rel_imx_4.1.15_2.1.0_ga</a></td>        <td align="left">NXP u-boot仓库tags中的rel_imx_4.1.15_2.1.0_ga</td>    </tr>    <tr>        <td align="center" rowspan="2">I.MX6ULL</td>        <td align="left"><a href="https://www.nxp.com.cn/docs/en/data-sheet/IMX6ULLIEC.pdf" target="_blank">i.MX 6ULL Applications Processors for Industrial Products</a></td>        <td align="left">I.MX6ULL 芯片手册（datasheet，可以在线查看）</td>    </tr>    <tr>        <td align="left"><a href="https://www.nxp.com.cn/webapp/Download?colCode=IMX6ULLRM&lang_cd=zh" target="_blank">i.MX 6ULL Applications ProcessorReference Manual</a></td>        <td align="left">I.MX6ULL 参考手册（下载后才能查看，需要登录NXP官网）</td>    </tr></table>
              </div>
            </details>

<h1 id="一、写在最前面的"><a href="#一、写在最前面的" class="headerlink" title="一、写在最前面的"></a><font size=3>一、写在最前面的</font></h1><p>前面我们已经可以将正点原子出厂的系统烧写到SD卡或者EMMC中了，但是在开发过程中我们是要不断修改镜像和设备树以及根文件系统的，这样调试的话每次都要重新烧写，就格外的麻烦，其实uboot是支持从tftp下载设备树和linux镜像的，然后支持从nfs挂载根文件系统，这一节我们就来试一试吧。</p>
<p>由于还未开始学习uboot和linux内核、根文件系统等的移植，所以先使用正点原子出厂系统，先熟悉操作流程。注意本节使用的ubuntu版本是20.04。版本如下：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">sumu@sumu-virtual-machine:~/4nfs$ cat /proc/version</span><br><span class="line">Linux version 5.15.0-119-generic (buildd@lcy02-amd64-068) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #129~20.04.1-Ubuntu SMP Wed Aug 7 13:07:13 UTC 2024</span><br><span class="line">sumu@sumu-virtual-machine:~/4nfs$ lsb_release -a</span><br><span class="line">No LSB modules are available.</span><br><span class="line">Distributor ID:	Ubuntu</span><br><span class="line">Description:	Ubuntu 20.04.6 LTS</span><br><span class="line">Release:	20.04</span><br><span class="line">Codename:	focal</span><br></pre></td></tr></table></figure>

<h1 id="二、网络环境"><a href="#二、网络环境" class="headerlink" title="二、网络环境"></a><font size=3>二、网络环境</font></h1><p>首先在正点原子出厂系统下，根据《LV02-03-网络环境-01-网络开发环境搭建》、《LV02-03-网络环境-02-TFTP环境搭建》和《LV02-03-网络环境-03-NFS环境搭建》这三节的笔记搭建好网络环境。</p>
<h2 id="1-Ubuntu"><a href="#1-Ubuntu" class="headerlink" title="1. Ubuntu"></a><font size=3>1. Ubuntu</font></h2><p>ubuntu的IP地址如下：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830071116981.png" alt="image-20240830071116981" style="zoom:67%;" />

<p>所以ubuntu使用的ip为：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">192.168.10.108</span><br></pre></td></tr></table></figure>



<h2 id="2-windows"><a href="#2-windows" class="headerlink" title="2. windows"></a><font size=3>2. windows</font></h2><p>windows以太网口的信息如下</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830071234560.png" alt="image-20240830071234560" style="zoom:35%;" />

<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">IPv4地址    192.168.10.100</span><br><span class="line">IPv4子网掩码 255.255.255.0</span><br><span class="line">IPv4默认网关 192.168.10.1</span><br></pre></td></tr></table></figure>

<h2 id="3-Linux开发板"><a href="#3-Linux开发板" class="headerlink" title="3. Linux开发板"></a><font size=3>3. Linux开发板</font></h2><p>这个其实也不需要，主要是uboot阶段会设置IP，但是这里记录一下吧：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830071804472.png" alt="image-20240830071804472" style="zoom:43%;" />

<p>所以开发板起来之后使用的IP为：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">192.168.10.109</span><br></pre></td></tr></table></figure>

<h1 id="三、文件准备"><a href="#三、文件准备" class="headerlink" title="三、文件准备"></a><font size=3>三、文件准备</font></h1><h2 id="1-需要哪些文件？"><a href="#1-需要哪些文件？" class="headerlink" title="1. 需要哪些文件？"></a><font size=3>1. 需要哪些文件？</font></h2><p>前面学习烧写系统的时候，我们会向开发板中烧写uboot、linux内核、还有设备树这几个主要的文件。uboot是我们要使用的，只能提前通过脚本或者mfgtool烧写到开发板中，这里主要是从tftp加载linx内核和设备树，从nfs挂载根文件系统。所以我们需要的是linux内核镜像zImage，根文件系统rootfs.tar.bz2以及设备树文件。根文件系统rootfs和linx内核文件很容易就找到了，但是用的是哪个设备树？（其实我们在设置开发板uboot参数的时候会指定设备树的名称，但是这里使用的是正点原子出厂系统做测试，就和出厂系统使用的保持一致吧）</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830074206692.png" alt="image-20240830074206692" style="zoom:42%;" />

<p>这个时候，要是我们自己在移植系统的话很好选择，可是现在只是在出厂系统验证行网络启动的功能，我们其实可以从uboot中获取使用的设备树的名字，我们开机进入uboot中：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830074346769.png" alt="image-20240830074346769" style="zoom: 50%;" />

<p>在这读秒变成0前按下Enter就会进入uboot，我们敲下print命令可以看到使用的设备树是imx6ull-14x14-emmc-4.3-800x480-c.dtb这个：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830074505866.png" alt="image-20240830074505866" style="zoom: 50%;" />

<h2 id="2-获取文件"><a href="#2-获取文件" class="headerlink" title="2. 获取文件"></a><font size=3>2. 获取文件</font></h2><p>上面知道我们需要准备zImage、dtb和根文件系统，我们从正点原子出厂开发工具中拷贝出来，</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731182205914.png" alt="image-20230731182205914" style="zoom:42%;" />

<p>如下所示：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830075012052.png" alt="image-20240830075012052" style="zoom:40%;" />

<p>将对应的文件拷贝到虚拟机中的ubuntu中，分别放在ubuntu的指定目录下，如下图：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240830075400490.png" alt="image-20240830075400490" style="zoom: 67%;" />

<h1 id="四、uboot下的操作"><a href="#四、uboot下的操作" class="headerlink" title="四、uboot下的操作"></a><font size=3>四、uboot下的操作</font></h1><h2 id="1-进入uboot"><a href="#1-进入uboot" class="headerlink" title="1. 进入uboot"></a><font size=3>1. 进入uboot</font></h2><p>要是使用自己移植的uboot的话，开机时会有如下提示：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731182402754.png" alt="image-20230731182402754" style="zoom:50%;" />

<p>在读秒结束前，按下任意按键，这里就会停在uboot界面啦。使用的是正点原子出厂系统的话，会是这样的，操作是一样的：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831063129685.png" alt="image-20240831063129685" style="zoom:50%;" />

<h2 id="2-网络环境变量设置"><a href="#2-网络环境变量设置" class="headerlink" title="2. 网络环境变量设置"></a><font size=3>2. 网络环境变量设置</font></h2><p>由于我们使用的是正点原子出厂的uboot，所以网络的驱动是移植好的，我们可以直接进行相关网络参数的配置。为防止可能之前修改过环境变量而导致无法挂载，我们可以使用 env default -a 指令先清除环境变量。  </p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">=&gt;env default -a;saveenv</span><br></pre></td></tr></table></figure>

<p>网络参数配置如下</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">=&gt;setenv ipaddr 192.168.10.109     # 开发板 IP 地址</span><br><span class="line">=&gt;setenv ethaddr 00:04:9f:04:d2:35 # 开发板网卡 MAC 地址 b8:ae:1d:01:00:00</span><br><span class="line">=&gt;setenv gatewayip 192.168.10.1    # 开发板默认网关</span><br><span class="line">=&gt;setenv netmask 255.255.255.0     # 开发板子网掩码</span><br><span class="line">=&gt;setenv serverip 192.168.10.108   # 服务器地址，也就是 Ubuntu 地址</span><br><span class="line">=&gt;saveenv # 保存环境变量</span><br><span class="line">=&gt;print ipaddr ethaddr gatewayip netmask serverip</span><br></pre></td></tr></table></figure>

<p>配置完我们可以打印看一下这些环境变量的值对不对：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831063627248.png" alt="image-20240831063627248" style="zoom:50%;" />

<p>然后我们ping一下ubuntu和windows：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">=&gt;ping 192.168.10.100  # windows</span><br><span class="line">=&gt;ping 192.168.10.108  # ubuntu20.04</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831065316358.png" alt="image-20240831065316358" style="zoom:46%;" />

<p>这样表示可以正常通信，这里可能会有几个个问题：</p>
<p>（1）那就是ubuntu若是使用的双网卡的话，它可能会ping失败，由于我之前是没有找到怎么放开发板默认与ubuntu的桥接网卡通信，所以这里我就直接把NAT网卡关掉了，但是吧，我后来使用的ubuntu20.04似乎并没有这个问题，上图中是ping通了的。</p>
<p>（2）和windows进行ping的时候也有时候ping不通，后来发现可能是因为我使用的是扩展坞扩展的网口的原因，所以这里就可以重启一下网口，可以使用win+r组合键调出运行框，然后输入以下命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ncpa.cpl</span><br></pre></td></tr></table></figure>

<p>然后就会打开控制界面，我们可以双击扩展的以太网口，进行禁用，然后重新启动即可。</p>
<p>（3）uboot 阶段， 虚拟机 ping 开发板可能是没有反馈的，也可以不用虚拟机去 ping 开发板，但是我这里看起来是ping通了。  </p>
<p>（4）这个MAC地址我是按文档上写的，其实好像随便写一个也行，比如我自己移植系统的时候测试用的<code>b8:ae:1d:01:00:00</code>。</p>
<p>（5）首次设置完开发板的网络参数的时候可能会出现下面的问题，我以为是出厂系统有问题，但其实重启一下就可以了：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831065241349.png" alt="image-20240831065241349" style="zoom:50%;" />

<h2 id="3-修改-bootcmd-和-bootargs"><a href="#3-修改-bootcmd-和-bootargs" class="headerlink" title="3. 修改 bootcmd 和 bootargs"></a><font size=3>3. 修改 bootcmd 和 bootargs</font></h2><h3 id="3-1-bootcmd"><a href="#3-1-bootcmd" class="headerlink" title="3.1 bootcmd"></a><font size=3>3.1 bootcmd</font></h3><p>我们在uboot输入以下命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">=&gt; setenv bootcmd &#x27;tftp 80800000 /imx6ull-alpha/zImage\;tftp 83000000 /imx6ull-alpha/imx6ull-14x14-emmc-4.3-800x480-c.dtb\;bootz 80800000 - 83000000&#x27;</span><br><span class="line">=&gt; saveenv    </span><br></pre></td></tr></table></figure>

<p>这里主要是设置从哪里下载设备树和linux镜像，我们在ubuntu中，tftp服务器目录下相关文件如下：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831065557292.png" alt="image-20240831065557292" style="zoom:69%;" />

<p>这里在进行配置的时候 &#x2F;home&#x2F;sumu&#x2F;3tftp 是作为根目录的，所以对于开发板来说，zImage 所在的目录为  &#x2F;imx6ull-alpha&#x2F;zImage。</p>
<p>注意：<code>80800000 - 83000000</code>中的<code>-</code>两边各有一个空格。</p>
<h3 id="3-2-bootargs"><a href="#3-2-bootargs" class="headerlink" title="3.2 bootargs"></a><font size=3>3.2 bootargs</font></h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">=&gt; setenv bootargs &#x27;console=ttymxc0,115200 root=/dev/nfs nfsroot=192.168.10.108:/home/sumu/4nfs/imx6ull-alpha,proto=tcp rw ip=192.168.10.109:192.168.10.108:192.168.10.1:255.255.255.0::eth0:off init=/linuxrc&#x27;</span><br><span class="line">=&gt; saveenv </span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">也可以换行写,注意用\换行时前面要有一个空格</span></span><br><span class="line">=&gt; setenv bootargs &#x27;console=ttymxc0,115200 root=/dev/nfs \</span><br><span class="line">					nfsroot=192.168.10.108:/home/sumu/4nfs/imx6ull-alpha,proto=tcp rw \</span><br><span class="line">					ip=192.168.10.109:192.168.10.108:192.168.10.1:255.255.255.0::eth0:off \</span><br><span class="line">					init=/linuxrc&#x27;</span><br><span class="line">=&gt; saveenv </span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>格式说明：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">=&gt; setenv bootargs &#x27;console=开发板串口,波特率 root=挂载方式 nfsroot=虚拟机ubuntu的IP地址:虚拟机ubuntu中文件系统路径,proto=传输协议 读写权限 ip=开发板IP地址:虚拟机ubuntu的IP地址:网关地址:子网掩码::开发板网口:off init=/linuxrc&#x27;</span><br><span class="line">=&gt; saveenv </span><br></pre></td></tr></table></figure>

<p>这里主要是设置nfs根文件系统的挂载目录，我们在ubuntu中，nfs目录下相关文件如下：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831065639933.png" alt="image-20240831065639933" style="zoom:67%;" />

<p>这里配置的时候就直接配置完整的绝对路径即可。</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831092758373.png" alt="image-20240831092758373" style="zoom:50%;" />

<p>【注意】这个地方有个坑，当时用的自己移植的系统，所以加上了<code>init=/linuxrc</code>这一句，要是使用正点原子官方出厂系统测试的话，这里不能加这个，不然会有问题。</p>
<h2 id="4-重启uboot测试"><a href="#4-重启uboot测试" class="headerlink" title="4. 重启uboot测试"></a><font size=3>4. 重启uboot测试</font></h2><p>接下来就是重启测试了，我们可直接按下复位键或者在uboot中输入 re ，再按下回车即可。</p>
<h3 id="4-1-uboot启动"><a href="#4-1-uboot启动" class="headerlink" title="4.1 uboot启动"></a><font size=3>4.1 uboot启动</font></h3><p>最开始就是uboot的启动，我们可以看到会有以下打印信息，这个图是之前自己移植的uboot的启动打印：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731184858116.png" alt="image-20230731184858116" style="zoom:50%;" />

<p>这里读秒结束后，便会开始运行bootcmd中的命令了。正点原子出厂系统的话，打印是这样的：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831070713973.png" alt="image-20240831070713973" style="zoom: 56%;" />

<h3 id="4-2-下载设备树和linux镜像"><a href="#4-2-下载设备树和linux镜像" class="headerlink" title="4.2 下载设备树和linux镜像"></a><font size=3>4.2 下载设备树和linux镜像</font></h3><img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831070810863.png" alt="image-20240831070810863" style="zoom:47%;" />

<p>到这一阶段，会先检测网络是否正常，若是正常，则会打印出服务器的地址和开发板的地址。然后就会开始下载linux镜像文件zImage。接着就会开始下载设备树，同样会先检测网络，然后打印服务器信息，最后开始下载文件。</p>
<h3 id="4-3-启动linux镜像"><a href="#4-3-启动linux镜像" class="headerlink" title="4.3 启动linux镜像"></a><font size=3>4.3 启动linux镜像</font></h3><p>接下来就是启动linux内核了:</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831071152604.png" alt="image-20240831071152604" style="zoom:34%;" />

<p>后边还有很多，这里就截取了一部分，其实要是用的ubuntu16.04及以下的话，这个时候系统应该是可以正常启动的，但是我用的版本较高，所以最后挂载根文件系统失败了：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831071321539.png" alt="image-20240831071321539" style="zoom:50%;" />

<details class="folding-tag" blue><summary> 点击查看自己移植的系统nFS挂载失败的现象 </summary>
              <div class='content'>
              <p>最后挂载失败是这样：</p><img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731185428305.png" alt="image-20230731185428305" style="zoom:50%;" />
              </div>
            </details>

<p>这里会发现的VFS就表示从nfs挂载根文件系统失败了。我们后边再说怎么处理，其实到这里按理说正常是已经实现了从tftp下载linux镜像和设备树，从nfs挂载镜像，这里怎么处理可以看《五、问题处理——1.ubuntu20.04 NFS版本问题》的笔记。 不出意外的话又出意外了，解决了NFS挂载不上的问题后，又会有如下报错：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831093853900.png" alt="image-20240831093853900" style="zoom:50%;" />

<p>这个好像是根文件系统的问题，是什么原因呢？原来是自己埋的坑啊，是因为加了一句<code>init=/linuxrc</code>，去掉就可以了。</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">=&gt; setenv bootargs &#x27;console=ttymxc0,115200 root=/dev/nfs \</span><br><span class="line">					nfsroot=192.168.10.108:/home/sumu/4nfs/imx6ull-alpha,proto=tcp rw \</span><br><span class="line">					ip=192.168.10.109:192.168.10.108:192.168.10.1:255.255.255.0::eth0:off&#x27;</span><br><span class="line">=&gt; saveenv </span><br></pre></td></tr></table></figure>

<p>修改之后就能挂载成功了，也能正常启动：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831095915924.png" alt="image-20240831095915924" style="zoom:30%;" />

<h2 id="5-恢复原有启动方式"><a href="#5-恢复原有启动方式" class="headerlink" title="5. 恢复原有启动方式"></a><font size=3>5. 恢复原有启动方式</font></h2><p>我们改了uboot的环境变量，怎么恢复默认？可以执行以下命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">=&gt;env default -a;saveenv</span><br></pre></td></tr></table></figure>

<p>这样就会回复默认的参数了。</p>
<h1 id="五、问题处理"><a href="#五、问题处理" class="headerlink" title="五、问题处理"></a><font size=3>五、问题处理</font></h1><h2 id="1-ubuntu20-04-NFS版本问题"><a href="#1-ubuntu20-04-NFS版本问题" class="headerlink" title="1. ubuntu20.04 NFS版本问题"></a><font size=3>1. ubuntu20.04 NFS版本问题</font></h2><h3 id="1-1-确认当前支持的nfs版本"><a href="#1-1-确认当前支持的nfs版本" class="headerlink" title="1.1 确认当前支持的nfs版本"></a><font size=3>1.1 确认当前支持的nfs版本</font></h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo cat /proc/fs/nfsd/versions</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831072012231.png" alt="image-20240831072012231" style="zoom: 67%;" />

<p>（1）如果版本信息中包括了+2，而uboot的nfs服务仍不可使用，则这个方式应该也还是无法解决问题，就需要查找其它资料了。</p>
<p>（2）如果版本信息中包括了-2，则ubuntu内核版本不需要修改，直接跳到 修改nfs配置文件就可以了。</p>
<p>（3）如果版本信息中，最低是+3，则需要先切换ubuntu的Linux内核。这是因为Linux的6.2以上版本内核，将不再支持nfs2。</p>
<h3 id="1-2-切换Linux内核"><a href="#1-2-切换Linux内核" class="headerlink" title="1.2 切换Linux内核"></a><font size=3>1.2 切换Linux内核</font></h3><h4 id="1-2-1-查看当前存在的内核版本"><a href="#1-2-1-查看当前存在的内核版本" class="headerlink" title="1.2.1 查看当前存在的内核版本"></a><font size=3>1.2.1 查看当前存在的内核版本</font></h4><p>使用命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">uname -r</span><br></pre></td></tr></table></figure>

<p>如果显示的版本是6.2以上，则必须先降低Linux版本，比如这里是6.5版本：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">6.5.0-15-generic</span><br></pre></td></tr></table></figure>

<p>使用命令查看当前存在的内核镜像:</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">dpkg --get-selections | grep linux-image</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/a698df05cdd9e623d22c8213a1c13f1c.png" alt="在这里插入图片描述" style="zoom:67%;" />

<p>如果没有6.2以下版本，（后面要写着install）则需要安装内核镜像才行。<strong>就算是写着install，也建议按照下面的步骤再安装一次，因为可能image装了，但是headers之类的没装！</strong></p>
<h4 id="1-2-2-安装指定版本的Linux内核"><a href="#1-2-2-安装指定版本的Linux内核" class="headerlink" title="1.2.2 安装指定版本的Linux内核"></a><font size=3>1.2.2 安装指定版本的Linux内核</font></h4><ul>
<li>（1）安装镜像</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install linux-image-5.19.0-50-generic</span><br></pre></td></tr></table></figure>

<ul>
<li>（2）安装内核头文件</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install linux-headers-5.19.0-50-generic</span><br></pre></td></tr></table></figure>

<ul>
<li>（3）安装内核模块</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install linux-modules-5.19.0-50-generic</span><br></pre></td></tr></table></figure>

<ul>
<li>（4）安装驱动</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install linux-modules-extra-5.4.0-99-generic    </span><br></pre></td></tr></table></figure>

<ul>
<li>（5）要是出现问题的话，修复命令如下：</li>
</ul>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt --fix-broken install</span><br></pre></td></tr></table></figure>

<ul>
<li>（6）检查是否安装成功</li>
</ul>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">dpkg -l | grep 5.19.0-50-generic</span><br></pre></td></tr></table></figure>

<p>如下为成功</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/1e1b512e5cab46991cdb1db8120416f5.png" alt="在这里插入图片描述" style="zoom: 30%;" />

<h4 id="1-2-3-修改启动配置，使用新的Linux内核启动"><a href="#1-2-3-修改启动配置，使用新的Linux内核启动" class="headerlink" title="1.2.3 修改启动配置，使用新的Linux内核启动"></a><font size=3>1.2.3 修改启动配置，使用新的Linux内核启动</font></h4><p>修改启动配置，打开文件：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo vim /etc/default/grub</span><br></pre></td></tr></table></figure>

<p>找到GRUB_DEFAULT&#x3D;0，修改为：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">GRUB_DEFAULT=“Advanced options for Ubuntu&gt;Ubuntu,with Linux 5.19.0-50-generic”</span><br></pre></td></tr></table></figure>

<p>找到GRUB_TIMEOUT&#x3D;0，修改为：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">GRUB_TIMEOUT=20</span><br></pre></td></tr></table></figure>

<p>找到GRUB_CMDLINE_LINUX_DEFAULT&#x3D;“quiet splash”，修改为</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">GRUB_CMDLINE_LINUX_DEFAULT=“text”</span><br></pre></td></tr></table></figure>

<p>保存退出文件。然后更新grub：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo update-grub</span><br></pre></td></tr></table></figure>

<p>最后重启系统：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo reboot</span><br></pre></td></tr></table></figure>

<h4 id="1-2-4-开机选择合适的Linux内核版本"><a href="#1-2-4-开机选择合适的Linux内核版本" class="headerlink" title="1.2.4 开机选择合适的Linux内核版本"></a><font size=3>1.2.4 开机选择合适的Linux内核版本</font></h4><p>开机后会进入下面的页面，选择下面高亮这个进入：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/34f42d8017aaf6e91ee148b34a7b5eb1.png" alt="在这里插入图片描述" style="zoom:25%;" />

<p>选择合适的Linux内核进行启动：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/0a316cd4e33c9b5f7da5c7564c7009b9.png" alt="在这里插入图片描述" style="zoom: 33%;" />

<p>启动完成后，再次使用命令查看linux内核信息：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">uname -r</span><br></pre></td></tr></table></figure>

<p>会发现版本切换成功：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/530ed47555b7f0571c0279e06b9695d7.png" alt="在这里插入图片描述" style="zoom:96%;" />

<p><strong>保证Linux版本是 5.x 的就可以正常开启使用nfs2服务。</strong></p>
<h3 id="1-3-NFS配置"><a href="#1-3-NFS配置" class="headerlink" title="1.3 NFS配置"></a><font size=3>1.3 NFS配置</font></h3><p>前面已经安装过nfs了，接下来我么直接开始配。</p>
<h4 id="1-3-1-修改-etc-default-nfs-kernel-server文件"><a href="#1-3-1-修改-etc-default-nfs-kernel-server文件" class="headerlink" title="1.3.1 修改&#x2F;etc&#x2F;default&#x2F;nfs-kernel-server文件"></a><font size=3>1.3.1 修改&#x2F;etc&#x2F;default&#x2F;nfs-kernel-server文件</font></h4><p>打开配置文件：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo vim /etc/default/nfs-kernel-server</span><br></pre></td></tr></table></figure>

<p>修改下面几个地方，要是没有就直接添加就好了：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831085847054.png" alt="image-20240831085847054" style="zoom: 67%;" />

<p>不出意外的话，后面肯定出意外了，重启之后查询启动情况会报这些问题：</p>
<p>（1）<code>--ver</code>相关报错：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831092037495.png" alt="image-20240831092037495" style="zoom:41%;" />

<p>（2）<code>--udp</code>相关报错：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831092136017.png" alt="image-20240831092136017" style="zoom:41%;" />

<p>根据报错提示，修改如下：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831091929874.png" alt="image-20240831091929874" style="zoom:67%;" />

<h4 id="1-3-2-修改-etc-hosts文件"><a href="#1-3-2-修改-etc-hosts文件" class="headerlink" title="1.3.2 修改&#x2F;etc&#x2F;hosts文件"></a><font size=3>1.3.2 修改&#x2F;etc&#x2F;hosts文件</font></h4><p>打开hosts文件：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo vim /etc/hosts</span><br></pre></td></tr></table></figure>

<p>添加开发板的ip和nfs服务器的地址：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831090140714.png" alt="image-20240831090140714" style="zoom:67%;" />

<p>ip是开发板的ip，后面那个是nfs文件系统存放的绝对路径。</p>
<h4 id="1-3-3-修改-etc-nfs-conf文件"><a href="#1-3-3-修改-etc-nfs-conf文件" class="headerlink" title="1.3.3 修改&#x2F;etc&#x2F;nfs.conf文件"></a><font size=3>1.3.3 修改&#x2F;etc&#x2F;nfs.conf文件</font></h4><p>打开文件：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo vim /etc/nfs.conf</span><br></pre></td></tr></table></figure>

<p>这个文件在ubuntu20.04中好像没有，那就直接新建好了：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831090512467.png" alt="image-20240831090512467" style="zoom:67%;" />

<h3 id="1-4-重启nfs服务"><a href="#1-4-重启nfs服务" class="headerlink" title="1.4 重启nfs服务"></a><font size=3>1.4 重启nfs服务</font></h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo exportfs  -ar</span><br><span class="line">sudo service nfs-kernel-server restart</span><br></pre></td></tr></table></figure>

<p>执行下面的命令确认nfs服务开启：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">netstat -a | grep &quot;nfs&quot;</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831092241852.png" alt="image-20240831092241852" style="zoom:67%;" />

<h3 id="1-5-查看nfs版本号"><a href="#1-5-查看nfs版本号" class="headerlink" title="1.5 查看nfs版本号"></a><font size=3>1.5 查看nfs版本号</font></h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo cat /proc/fs/nfsd/versions</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20240831092332328.png" alt="image-20240831092332328" style="zoom:67%;" />

<p>可以看到nfs版本中已经有了+2。然后我们重启开发板应该就可以正常挂载根文件系统了。</p>
<blockquote>
<p>参考资料：</p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/m0_58756221/article/details/136066519">【嵌入式Linux开发】Ubuntu22.04切换Linux内核，启用nfs2，解决uboot无法通过nfs服务从Ubuntu下载系统镜像（TTTTTT）_ubuntu22.04切换kernel6.2-CSDN博客</a></p>
</blockquote>
<h2 id="2-ubuntu22-04-NFS版本问题"><a href="#2-ubuntu22-04-NFS版本问题" class="headerlink" title="2. ubuntu22.04 NFS版本问题"></a><font size=3>2. ubuntu22.04 NFS版本问题</font></h2><p>说明：这个问题是最开始的学习的时候用ubuntu22.04出现的，以及解决办法，后来用了20.04，看上一节笔记就是了，这里可以作为参考。</p>
<p>对于上边开发板无法从新版本的ubuntu挂载nfs上的根文件系统的问题，这里我们来看一下怎么处理。（这个问题比较顽固，而且由于后面ubuntu22.04下总是有各种问题，所以后来我就换回ubuntu16.04啦，这里拿来参考下好了）。</p>
<p>在网上查阅资料会发现，linux内核支持的nfs协议是2.0的，但是新版本的ubuntu默认是不支持nfs2.0的，我们可以看一下当前系统支持的nfs协议版本：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo cat /proc/fs/nfsd/versions</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731192258556.png" alt="image-20230731192258556" style="zoom:50%;" />

<p>可以看到，新版本的ubuntu是没有支持nfs2.0协议的，所以开发板和ubuntu通过nfs通信失败也是正常，那怎么处理？网上一搜就有很多资料，一般都是修改下边这个文件，添加nfs2.0协议：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo vim /etc/default/nfs-kernel-server</span><br></pre></td></tr></table></figure>

<p>这个文件修改后的完成内容为：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Number of servers to start up</span></span><br><span class="line">RPCNFSDCOUNT=&quot;8&quot;</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Runtime priority of server (see <span class="built_in">nice</span>(1))</span></span><br><span class="line">RPCNFSDPRIORITY=0</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Options <span class="keyword">for</span> rpc.mountd.</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">If you have a port-based firewall, you might want to <span class="built_in">set</span> up</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">a fixed port here using the --port option. For more information,</span> </span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">see rpc.mountd(8) or http://wiki.debian.org/SecuringNFS</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">To <span class="built_in">disable</span> NFSv4 on the server, specify <span class="string">&#x27;--no-nfs-version 4&#x27;</span> here</span></span><br><span class="line">RPCMOUNTDOPTS=&quot;--manage-gids&quot;</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Do you want to start the svcgssd daemon? It is only required <span class="keyword">for</span> Kerberos</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">exports. Valid alternatives are <span class="string">&quot;yes&quot;</span> and <span class="string">&quot;no&quot;</span>; the default is <span class="string">&quot;no&quot;</span>.</span></span><br><span class="line">NEED_SVCGSSD=&quot;&quot;</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Options <span class="keyword">for</span> rpc.svcgssd.</span></span><br><span class="line">RPCSVCGSSDOPTS=&quot;&quot;</span><br><span class="line">RPCNFSDOPTS=&quot;--nfs-version 2,3,4 --debug --syslog&quot;</span><br></pre></td></tr></table></figure>

<p>其实就是在最后一行添加了一个2，修改完后我们保存，然后重启nfs服务：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo service nfs-kernel-server restart</span><br></pre></td></tr></table></figure>

<p>然后再查看一下nfs的支持版本：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo cat /proc/fs/nfsd/versions</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731193136229.png" alt="image-20230731193136229" style="zoom:50%;" />

<p>发现并未生效，原因在哪呢？原因在于我们的系统实在太信了，所以还有其他的文件需要配置，哪个文件？我们可以去ubuntu官网搜索一下（<a target="_blank" rel="noopener" href="https://ubuntu.com/">Enterprise Open Source and Linux | Ubuntu</a>）会发现这样一篇文章：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731192629843.png" alt="image-20230731192629843" style="zoom:50%;" />

<p>我们可以点进去看一下，它其实说的就是<a target="_blank" rel="noopener" href="https://discourse.ubuntu.com/t/network-file-system-nfs/11571">Network File System (NFS)</a>，我们往下阅读就可以看到这部分关于ubuntu22.04的：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731192747078.png" alt="image-20230731192747078" style="zoom:50%;" />

<p>从这里可以知道还有个 &#x2F;etc&#x2F;nfs.conf 文件，我们修改下这个文件：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo vim /etc/nfs.conf</span><br></pre></td></tr></table></figure>

<p>把文件汇总vers2&#x3D;n改为vers2&#x3D;y，并把前面的#去掉：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731193359465.png" alt="image-20230731193359465" style="zoom:50%;" />

<p>然后我们重启nfs服务并查看一下当前系统支持的nfs协议版本：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731193446085.png" alt="image-20230731193446085" style="zoom:50%;" />

<p>发现这个时候，nfs2.0协议被支持，然后我们重启开发板，就会正常挂载nfs中的根文件系统啦，此时我们的uboot相关环境变量如下所示：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731195134292.png" alt="image-20230731195134292" style="zoom:50%;" />

<p>不出意外的话，VFS这里是可以加载成功的，但是又报错了：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731195712698.png" alt="image-20230731195712698" style="zoom:50%;" />

<p>后边这些错似乎是因为根文件系统，我后来换了自己以前移植的busybox根文件系统后就正常了，可以正常进入终端：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731200100507.png" alt="image-20230731200100507" style="zoom:50%;" />

<p>所以前边的方法是可以处理掉nfs协议不对的问题的。</p>
<h2 id="2-设备树名称问题"><a href="#2-设备树名称问题" class="headerlink" title="2. 设备树名称问题"></a><font size=3>2. 设备树名称问题</font></h2><p>这个问题是最开始的学习的时候出现的，这里没更新相关内容，但是逻辑都是一样的。</p>
<h3 id="2-1-问题复现"><a href="#2-1-问题复现" class="headerlink" title="2.1 问题复现"></a><font size=3>2.1 问题复现</font></h3><p>有时候可能会出现这样的问题uboot可以正常启动内核，但是显示完 Starting kernel … 之后，就卡死了，不再有输出，然后我们还会看到有这么一个 error ：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20221023160744688.png" alt="image-20221023160744688" style="zoom:50%;" />

<p>这是我以前遇到的一个问题，在这里也记录一下吧。我们其实可以将ubuntu中设备树的名字改掉，例如：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731200750378.png" alt="image-20230731200750378" style="zoom:62%;" />

<p>然后我们按之前的参数重启开发板：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731201012558.png" alt="image-20230731201012558" style="zoom:50%;" />

<p>就会发现，这里会提示找不到文件，但是系统还是正常起来了，以前遇到的卡死问题，倒是不知道为什么发生了，先不管，这里了解一下就行。</p>
<h3 id="2-2-问题分析"><a href="#2-2-问题分析" class="headerlink" title="2.2 问题分析"></a><font size=3>2.2 问题分析</font></h3><p>其实很明显，出现这个错误的原因是因为 uboot 里面默认的设备树名字就是 imx6ull-14x14-emmc-4.3-800x480-c.dtb，但是呢，我们读取的地方并不存在这个文件，或者文件名不对的时候，就会出现这样的情况。</p>
<h3 id="2-3-解决方法"><a href="#2-3-解决方法" class="headerlink" title="2.3 解决方法"></a><font size=3>2.3 解决方法</font></h3><h4 id="2-3-1-解决方法1"><a href="#2-3-1-解决方法1" class="headerlink" title="2.3.1 解决方法1"></a><font size=3>2.3.1 解决方法1</font></h4><p>我们修改一下 boocmd 和 bootargs 环境变量的值：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">=&gt; setenv bootcmd &#x27;tftp 80800000 /imx6ull/zImage\;tftp 83000000 /imx6ull/imx6ull-alpha-emmc.dtb\;bootz 80800000 - 83000000&#x27;</span><br><span class="line">=&gt; saveenv    </span><br></pre></td></tr></table></figure>

<p>然后我们重启开发板，就会发现可以正常启动了：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/LV01-02-IMX6ULL-ALPHA%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BD%93%E9%AA%8C-05-%E4%BB%8Etftp%E5%92%8Cnfs%E5%90%AF%E5%8A%A8%E7%B3%BB%E7%BB%9F/img/image-20230731201429073.png" alt="image-20230731201429073" style="zoom:50%;" />

<h4 id="2-3-2-解决方法2"><a href="#2-3-2-解决方法2" class="headerlink" title="2.3.2 解决方法2"></a><font size=3>2.3.2 解决方法2</font></h4><p>上边的解决办法在每次重新烧写系统以后都要先手动设置一下 bootcmd 的值，这样有点麻烦 ，当然还有一劳永逸的方法，那就是我们直接修改 uboot 源码中默认的环境变量值。打开 uboot 源码中 include&#x2F;configs&#x2F;mx6ull_alpha_emmc.h 文件，在宏 CONFIG_EXTRA_ENV_SETTINGS 中找到如下所示内容：</p>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">&quot;findfdt=&quot;</span>\</span><br><span class="line">    <span class="string">&quot;if test $fdt_file = undefined; then &quot;</span> \</span><br><span class="line">    <span class="string">&quot;if test $board_name = EVK &amp;&amp; test $board_rev = 9X9; then &quot;</span> \</span><br><span class="line">    <span class="string">&quot;setenv fdt_file imx6ull-9x9-evk.dtb; fi; &quot;</span> \</span><br><span class="line">    <span class="string">&quot;if test $board_name = EVK &amp;&amp; test $board_rev = 14X14; then &quot;</span> \</span><br><span class="line">    <span class="string">&quot;setenv fdt_file imx6ull-14x14-evk.dtb; fi; &quot;</span> \</span><br><span class="line">    <span class="string">&quot;if test $fdt_file = undefined; then &quot;</span> \</span><br><span class="line">    <span class="string">&quot;echo WARNING: Could not determine dtb to use; fi; &quot;</span> \</span><br><span class="line">    <span class="string">&quot;fi;\0&quot;</span> \</span><br></pre></td></tr></table></figure>

<p>findfdt 就是用于确定设备树文件名字的环境变量， fdt_file 环境变量保存着设备树文件名。第 3 行和 4 行用于判断设备树文件名字是否为 imx6ull-9x9-evk.dtb，第 5 行和 6 行用于判断设备树文件名字是否为 imx6ull-14x14-evk.dtb。这两个设备树都是 NXP 官方开发板使用的， I.MX6U-ALPHA 开发板用不到，因此直接将 findfdt 的值改为如下内容：</p>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">&quot;findfdt=&quot;</span>\</span><br><span class="line">    <span class="string">&quot;if test $fdt_file = undefined; then &quot;</span> \</span><br><span class="line">    <span class="string">&quot;setenv fdt_file imx6ull-alpha-emmc.dtb; &quot;</span> \</span><br><span class="line">    <span class="string">&quot;fi;\0&quot;</span> \</span><br></pre></td></tr></table></figure>

<p>然后我们重新编译uboot，替换掉之前的uboot.imx文件，然后重新烧写就可以啦，就可以达到与之前一样的效果啦。</p>

    </div>

    
    
    

    <footer class="post-footer">




    <div>
        
            <div style="text-align:center;color: #ccc;font-size:14px;">
            ----------本文结束
            <i class="fas fa-fan fa-spin" style="color: #FF1493; font-size: 1rem"></i>
            感谢您的阅读----------
            </div>
        
    </div>





  
  <div class="my_post_copyright"> 
    <p><span>文章标题:</span><a href="/post/172a0248.html">LV01-02-IMX6ULL-ALPHA开发板体验-05-从tftp和nfs启动系统</a></p>
    <p><span>文章作者:</span><a href="/" title="欢迎访问 《苏木》 的学习笔记">苏木</a></p>
    <p><span>发布时间:</span>2023年09月08日 - 19:25</p>
    <p><span>最后更新:</span>2025年06月14日 - 00:25</p>
    <p><span>原始链接:</span><a href="/post/172a0248.html" title="LV01-02-IMX6ULL-ALPHA开发板体验-05-从tftp和nfs启动系统">https://sumumm.github.io/post/172a0248.html</a></p>
    <p><span>许可协议:</span><i class="fab fa-creative-commons"></i> <a rel="license" href= "https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p>  
  </div>
  


          <div class="post-tags">
              <a href="/tags/ALPHA-LV01-IMX6ULL%E5%B9%B3%E5%8F%B0/" rel="tag"><i class="fa fa-tag"></i> (ALPHA)LV01-IMX6ULL平台</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/post/51fee987.html" rel="prev" title="LV01-03-Cortex-A7架构-01-ARM处理器程序运行">
                  <i class="fa fa-angle-left"></i> LV01-03-Cortex-A7架构-01-ARM处理器程序运行
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/post/7a886af.html" rel="next" title="LV01-02-IMX6ULL-ALPHA开发板体验-04-基本功能测试">
                  LV01-02-IMX6ULL-ALPHA开发板体验-04-基本功能测试 <i class="fa fa-angle-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">

  <div class="copyright">
    &copy; 2017 – 
    <span itemprop="copyrightYear">2025</span>
    <span class="with-love">
      <i class="fa fa-heart"></i>
    </span>
    <span class="author" itemprop="copyrightHolder">苏木</span>
  </div>
<div class="wordcount">
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-line"></i>
    </span>
      <span>站点总字数：</span>
    <span title="站点总字数">3.7m</span>
  </span>
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
      <span>站点阅读时长 &asymp;</span>
    <span title="站点阅读时长">225:26</span>
  </span>
</div>




    <span id="sitetime"></span>
    <script defer language=javascript>
        function siteTime()
        {
            window.setTimeout("siteTime()", 1000);
            var seconds = 1000;
            var minutes = seconds * 60;
            var hours = minutes * 60;
            var days = hours * 24;
            var years = days * 365;
            var today = new Date();
            var todayYear = today.getFullYear();
            var todayMonth = today.getMonth()+1;
            var todayDate = today.getDate();
            var todayHour = today.getHours();
            var todayMinute = today.getMinutes();
            var todaySecond = today.getSeconds();
            /*==================================================
            Date.UTC() -- 返回date对象距世界标准时间(UTC)1970年1月1日午夜之间的毫秒数(时间戳)
            year        - 作为date对象的年份，为4位年份值
            month       - 0-11之间的整数，做为date对象的月份
            day         - 1-31之间的整数，做为date对象的天数
            hours       - 0(午夜24点)-23之间的整数，做为date对象的小时数
            minutes     - 0-59之间的整数，做为date对象的分钟数
            seconds     - 0-59之间的整数，做为date对象的秒数
            microseconds - 0-999之间的整数，做为date对象的毫秒数
            ==================================================*/
            var t1 = Date.UTC(2017, 
                              5, 
                              19, 
                              0, 
                              0, 
                              0); //北京时间
            var t2 = Date.UTC(todayYear,todayMonth,todayDate,todayHour,todayMinute,todaySecond);
            var diff = t2-t1;
            var diffYears = Math.floor(diff/years);
            var diffDays = Math.floor((diff/days)-diffYears*365);
            var diffHours = Math.floor((diff-(diffYears*365+diffDays)*days)/hours);
            var diffMinutes = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours)/minutes);
            var diffSeconds = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours-diffMinutes*minutes)/seconds);
            document.getElementById("sitetime").innerHTML="已在这里 "+diffYears+" 年 "+diffDays+" 天 "+diffHours+" 小时 "+diffMinutes+" 分钟 "+diffSeconds+" 秒";
        }
        siteTime();
    </script>



    </div>
  </footer>

  
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up fa-lg"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/next-theme-pjax/0.6.0/pjax.min.js" integrity="sha256-vxLn1tSKWD4dqbMRyv940UYw4sXgMtYcK6reefzZrao=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/fancyapps-ui/5.0.28/fancybox/fancybox.umd.js" integrity="sha256-ytMJGN3toR+a84u7g7NuHm91VIR06Q41kMWDr2pq7Zo=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/lozad.js/1.16.0/lozad.min.js" integrity="sha256-mOFREFhqmHeQbXpK2lp4nA3qooVgACfh88fpJftLBbc=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script><script src="/js/pjax.js"></script>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/hexo-generator-searchdb/1.4.1/search.js" integrity="sha256-1kfA5uHPf65M5cphT2dvymhkuyHPQp5A53EGZOnOLmc=" crossorigin="anonymous"></script>
<script src="/js/third-party/search/local-search.js"></script>




  <script src="/js/third-party/fancybox.js"></script>

  <script src="/js/third-party/pace.js"></script>


  




  

  <script class="next-config" data-name="enableMath" type="application/json">true</script><script class="next-config" data-name="mathjax" type="application/json">{"enable":true,"tags":"none","js":{"url":"https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.js","integrity":"sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI="}}</script>
<script src="/js/third-party/math/mathjax.js"></script>


 
        <div id="click-show-text"
            data-mobile = false
            data-text = 富强,民主,文明,和谐,自由,平等,公正,法制,爱国,敬业,诚信,友善
            data-fontsize = 15px
            data-random= false>
        </div>
       

      
        <script async src=https://cdn.jsdelivr.net/npm/hexo-next-mouse-effect@latest/click/showText.js></script>
      

      
    




    <script async src="/js/fancybox_param.js"></script>





<!-- APlayer本体 -->



</body>
</html>
